<?php

session_start();

if($_SESSION["login"] == true)
{
	
	//echo "hello session";
	if(isset($_SESSION["goods"]))						//goods是一个数组用来保存会话中用户添加的商品				
	{
		$_SESSION["goods"][count($_SESSION["goods"])] = 1;
	}
	else
	{
	    $_SESSION["goods"][0]  = 2 ;
	}
	
	
	echo "the number of goods you select is : ".$_SESSION["goodsno"];
	
}
else
{
	echo "no session is set";
}
?>